<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/base/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>${systemOption.systemTitle}</title>
    <%@ include file="/base/head.jsp"%>
    <script type="text/javascript" src="${ctx}/js/extendDataGrid.js"></script>
    <script type="text/javascript" charset="UTF-8">
    
    formatterDate = function(date) {
			var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
			var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
			+ (date.getMonth() + 1);
			return date.getFullYear() + '-' + month + '-' + day;
	};
	//增加
  	function add_emp(){
  		$('#addWnd').show();
		$('#addForm').form('clear');
		$('#imgShow').attr('src','${ctx}/images/nophoto.png');
		new uploadPreview({ UpBtn: "up_img", DivShow: "imgdiv", ImgShow: "imgShow" });//创建图片预览效果	
		$('#addWnd').dialog({
			title:'员工增加',
        	modal:true,
        	buttons: [{
        		text:'确定',
				iconCls:'icon-ok',
				handler:function(){
					$('#addForm').form('submit',{
						onSubmit: function(){
							if($('#up_img').val()==''){
							    $.messager.alert('错误提示','请选择照片','error');
							    return $(this).form('false');     
							}
							else if($('#addUsername').val()==''){ 
							    $.messager.alert('错误提示','请输入用户名','error');
							    return $(this).form('false');

							}
							else if($('#addname').val()==''){ 
							    $.messager.alert('错误提示','请输入姓名','error');
							    return $(this).form('false');

							}else if($('#addsex').combobox('getValue')==''){
									$.messager.alert('错误提示','请选择性别','error');
							    return $(this).form('false');

							}else if($('#addsfzh').val()==''){
									$.messager.alert('错误提示','请输入身份证号','error');
							    return $(this).form('false');

							}
							else if($('#addcsrq').datebox('getValue')==''){
									$.messager.alert('错误提示','请选择出生日期','error');
							    return $(this).form('false');

							}
							else if($('#addUserDeptId').combobox('getValue')==''||$('#addUserDeptId').combobox('getValue')=='0'){
									$.messager.alert('错误提示','请选择部门','error');
							    return $(this).form('false');

							}else if($('#addUserStationId').combobox('getValue')==''||$('#addUserStationId').combobox('getValue')=='0'){
									$.messager.alert('错误提示','请选择岗位','error');
							    return $(this).form('false');

							}else if($('#addsjhm').val()==''){
									$.messager.alert('错误提示','请输入手机号码','error');
							    return $(this).form('false');

							}else  if($('#addsjhm').val()&&!isMobile($('#addsjhm').val()))	{
					                     $.messager.alert('错误提示','手机号码格式不对','error');
									    return $(this).form('false');
					           }
					           
					        else if($('#adddz').val()==''){
									$.messager.alert('错误提示','请输入地址','error');
							    return $(this).form('false');
							}
							
							else if($('#addrzrq').datebox('getValue')==''){
									$.messager.alert('错误提示','请选择入司日期','error');
							    return $(this).form('false');

							}
							
							else if($('#addhtdqrq').datebox('getValue')==''){
									$.messager.alert('错误提示','请选择合同终止日期','error');
							    return $(this).form('false');
							}
							
						
							
						},
						success: function(data){
								$.messager.alert('友情提示','增加成功','info'); 
								$('#addWnd').dialog('close');
								resetDG('#user');
							
						}
					});
				}
        	},{
        		text:'取消',
				iconCls:'icon-cancel',
				handler:function(){
					$('#addWnd').dialog('close');
				}
        	}]
        	
		});
  	}
  //修改
  function edit_Emp() {  	
			 var row = $('#user').datagrid('getSelected');
			if (!row){
				$.messager.alert('友情提示','请选择用户','error');
			}else{
				$('#updateWnd').show();
				$('#updateForm').form('clear');
				if(row.ygzp==null){
					$('#imgShow2').attr('src','${ctx}/images/nophoto.png');
				}else{
					$('#imgShow2').attr('src','${ctx}/'+row.ygzp);
				}
				new uploadPreview({ UpBtn: "up_img2", DivShow: "imgdiv2", ImgShow: "imgShow2" });//创建图片预览效果	
				$('#updateWnd').dialog({
					title:'信息修改',
		        	modal:true,
		        	buttons: [{
		        		text:'确定',
						iconCls:'icon-ok',
						handler:function(){
							$('#updateForm').form('submit',{
								onSubmit: function(){
							if($('#upUsername').val()==''){ 
							    $.messager.alert('错误提示','请输入用户名','error');
							    return $(this).form('false');

							}
							else if($('#upname').val()==''){ 
							    $.messager.alert('错误提示','请输入姓名','error');
							    return $(this).form('false');

							}else if($('#upsex').combobox('getValue')==''){
									$.messager.alert('错误提示','请选择性别','error');
							    return $(this).form('false');

							}else if($('#upsfzh').val()==''){
									$.messager.alert('错误提示','请输入身份证号','error');
							    return $(this).form('false');

							}
							else if($('#upCsrq').datebox('getValue')==''){
									$.messager.alert('错误提示','请选择出生日期','error');
							    return $(this).form('false');

							}
							else if($('#upUserDeptId').combobox('getValue')==''||$('#upUserDeptId').combobox('getValue')=='0'){
									$.messager.alert('错误提示','请选择部门','error');
							    return $(this).form('false');

							}else if($('#upUserStationId').combobox('getValue')==''||$('#upUserStationId').combobox('getValue')=='0'){
									$.messager.alert('错误提示','请选择岗位','error');
							    return $(this).form('false');

							}else if($('#upsjhm').val()==''){
									$.messager.alert('错误提示','请输入手机号码','error');
							    return $(this).form('false');

							}else  if($('#upsjhm').val()&&!isMobile($('#upsjhm').val()))	{
					                     $.messager.alert('错误提示','手机号码格式不对','error');
									    return $(this).form('false');
					           }
					           
					        else if($('#updz').val()==''){
									$.messager.alert('错误提示','请输入地址','error');
							    return $(this).form('false');
							}
							
							else if($('#uprzrq').datebox('getValue')==''){
									$.messager.alert('错误提示','请选择入司日期','error');
							    return $(this).form('false');

							}
							
							else if($('#uphtdqrq').datebox('getValue')==''){
									$.messager.alert('错误提示','请选择合同终止日期','error');
							    return $(this).form('false');
							}
							
									
								},
								success: function(data){
										$.messager.alert('友情提示','修改成功','info'); 
										$('#updateWnd').dialog('close');
										resetDG('#list');
									
								}
							});
						}
		        	},{
		        		text:'取消',
						iconCls:'icon-cancel',
						handler:function(){
							$('#updateWnd').dialog('close');
						}
		        	}]
		        	
				});
				console.log(row);
				$('#updateuserid').val(row.id);
				$('#upUsername').val(row.user.userName);
				$('#upname').val(row.user.name);
				$('#upsex').combobox('setValue',row.sex);
				$('#upUserDeptId').combotree('setValue',row.user.deptId);
				$('#upUserStationId').combobox('setValue',row.user.stationId);
				$('#upCsrq').datebox('setValue',formatterDate(new Date(row.birthday)));
				$('#upByyx').val(row.school);
				$('#upzy').val(row.zhuanye);
				$('#upxl').val(row.education);
				$('#upsfzh').val(row.sfzh);
				$('#upsjhm').val(row.phone);
				$('#upyx').val(row.email);
				$('#uphyzt').combobox('setValue',row.marriage);
				$('#uprzrq').datebox('setValue',formatterDate(new Date(row.rzsj)));
				$('#uphtdqrq').datebox('setValue',formatterDate(new Date(row.htdqrq)));
				$('#updz').val(row.address);
				$('#upRemark').val(row.remark);
				$('#uphdzs').val(row.certificate);
				
				//隐藏的数据赋值 
				$('#upuid').val(row.uid);
				$('#upspell').val(row.pyspell);
				$('#upuserId').val(row.user.id);
				
			}
	}


  
  function doQuery(){//分页按条件查询
  	var queryParams=$('#user').datagrid('options').queryParams;
  	queryParams.userName=$('#userNameSch').val();
  	queryParams.name=$('#nameSch').val();
  	queryParams.eduName=$('#eduNameSch').val();
  	queryParams.status=$('#statusSch').combobox('getValue');
  	queryParams.gender=$('#genderSch').combobox('getValue');
  	queryParams.deptId=$('#deptIdSch').combotree('getValue');
  	queryParams.stationId=$('#stationIdSch').combobox('getValue');
  	queryParams.hyzk=$('#hyzkSch').combobox('getValue');
  	//重置当前页数为1
  	resetDG('#user');
  }  

	//根据不同值，显示不同内容
	function formatStatus(val,row){
		if (val == 1){
			return '<span style="color:#C0FF3E;">正常</span>';
		}else if (val == 2){
			return '<span style="color:red;">停用</span>';
		}else if (val == 3){
			return '<span style="color:blue;">离职</span>';
		}
		 else {
			return '无';
		}
	}
	
	
	//根据不同值，显示不同内容
	function formatGender(val,row){
		if (val == 1){
			return '<span>男</span>';
		}else if (val == 2){
			return '<span >女</span>';
		}
		 else {
			return '未知';
		}
	}
	
		//根据不同值，显示不同内容
	function formatHyzk(val,row){
		if (val == 1){
			return '<span>未婚</span>';
		}else if (val == 2){
			return '<span >已婚</span>';
		}
		 else {
			return '未知';
		}
	}

  //锁定用户
  function lock_emp(){
  	var row = $('#user').datagrid('getSelected');
	if (!row){
		$.messager.alert('友情提示','请选择用户','error');
	}else{
		
		if(row.user.status!=1){
			$.messager.alert('友情提示','只能锁定用户状态为正常的用户','error');
			return;
		}
		$.messager.confirm('友情提示','您确定锁定该用户吗？',function(r){   
			if (r){   
				$.post("${ctx}/json/lockUser.action", {"id": row.user.id },
					function(data){
						if(data){
							$.messager.alert('友情提示','锁定成功','info'); 
							resetDG('#user');
						}else{
							$.messager.alert('友情提示','锁定失败','error'); 
						}
					}, "json");   
			}   
		});
	}
  }	
  //解锁用户
  function unlock_emp(){
  	var row = $('#user').datagrid('getSelected');
	if (!row){
		$.messager.alert('友情提示','请选择用户','error');
	}else{
		if(row.user.status!=2){
			$.messager.alert('友情提示','只可选择锁定用户解锁','error');
		}else{
			$.messager.confirm('友情提示','您确定解锁该用户吗？',function(r){   
			if (r){   
				$.post("${ctx}/json/unlockUser.action", {"id": row.user.id },
					function(data){
						if(data){  
							$.messager.alert('友情提示','解锁成功！','info'); 
							resetDG('#user');
						}else{
							$.messager.alert('友情提示','解锁失败','error'); 
						}
					}, "json");   
			}   
		});	
		}
	}
  }
  
   //详情
		function detail(){
	 	var row = $('#user').datagrid('getSelected');
	 	$('#xqdlg').show();	
	 	$('#xqdlg').dialog({
	 		title: '详情',   
		    width: 600,
		    height:500,
		    top:50,
		    closed : false,
			cache : false,
			maximizable : true,
			collapsible : false,
			minimizable : false,
		    href: '${ctx}/json/userDetail.action?id='+row.id,
		    cache: false, 
		    modal: true,
		    buttons:[{
		    	text:'关闭',
				iconCls:'icon-cancel',
				handler:function(){
					$('#xqdlg').dialog('close');
				}	    	
		    }]
	 	});	
	 } 
  //重置密码
  function resetpwd_emp(){
  	var row = $('#user').datagrid('getSelected');
	if (!row){
		$.messager.alert('友情提示','请选择用户','error');
	}else{
		$.messager.confirm('友情提示','您确定重置该用户的密码吗？',function(r){   
			console.log(row);
			if (r){   
				$.post("${ctx}/json/resetPwdUser.action", {"id": row.user.id },
					function(data){
						if(data){  
							$.messager.alert('友情提示','重置密码成功！密码:'+${systemOption.defaultPsw},'info'); 
							resetDG('#user');
						}else{
							$.messager.alert('友情提示','重置密码失败','error'); 
						}
					}, "json");   
			}   
		});	
	}
	
	}
	//员工离职
	function lz_emp(){
		var row = $('#user').datagrid('getSelected');
	if (!row){
		$.messager.alert('友情提示','请选择用户','error');
	}else{
		if(row.user.status==3){
		$.messager.alert('友情提示','该员工已离职','error');
		}else{
		
				$('#lizhiWnd').show();
				$('#lzuserid').val(row.id);
				$('#userlzrq').datebox('setValue', formatterDate(new Date()));
				 $('#lizhiWnd').dialog({
                	title:'员工离职',
                	modal:true,
                	buttons: [{
                		text:'确定',
						iconCls:'icon-ok',
						handler:function(){
							$('#lizhiForm').form('submit',{
								success: function(data){
									$('#lizhiWnd').dialog('close');
									if(data=='true'){
										$.messager.alert('友情提示','离职成功','info'); 
										resetDG('#user');
									}else{
										$.messager.alert('友情提示','离职失败','error'); 
									}
								}								
							});
						}
                	},{
                		text:'取消',
						iconCls:'icon-cancel',
						handler:function(){
							$('#lizhiWnd').dialog('close');
						},
                	}],                	
                });
				
		}
	}
	
	
  }  
 </script>
  </head>
  
  <body>
    
<!-- 主窗口 -->  	 
    <table id="user" class="easyui-datagrid" data-options="fit:true,
    								rownumbers:true,
									singleSelect:true,
									striped:true,
									fitColumns:false,
									toolbar:'#tb',
									pagination:true,
									pageSize:20,
									pageList:[20,30,50,100],
									onDblClickRow:detail,
									url:'${ctx}/emp/listEmp.action'">
		<thead frozen="true">
			<tr>
				<th data-options="field:'ck',checkbox:true"></th>
				<th data-options="field:'user.empId',align:'center',halign:'center'" width="120"><strong>工号</strong></th>
				<th data-options="field:'user.name',align:'center',halign:'center'" width="150"><strong>姓名</strong></th>
				<th data-options="field:'user.userName',align:'center'" width="80"><strong>用户名</strong></th>
			</tr>
		</thead>
		<thead>
			<tr>	
				<th data-options="field:'user.status',align:'center',formatter:formatStatus" width="80" ><strong>状态</strong></th>
				<th data-options="field:'user.deptName',align:'left',halign:'center'" width="150"><strong>部门</strong></th>
				<th data-options="field:'user.stationName',align:'left',halign:'center'" width="150"><strong>岗位</strong></th>
				<th data-options="field:'sfzh',align:'left',halign:'center'" width="150"><strong>身份证号</strong></th>
				<th data-options="field:'education',align:'center',halign:'center'" width="80"><strong>学历</strong></th>
				<th data-options="field:'sex',align:'center',halign:'center',formatter:formatGender" width="80"><strong>性别</strong></th>
				<th data-options="field:'marriage',align:'center',halign:'center',formatter:formatHyzk" width="80"><strong>婚姻状况</strong></th>
				<th data-options="field:'phone',align:'left',halign:'center'" width="150"><strong>联系电话</strong></th>
				<th data-options="field:'email',align:'left',halign:'center'" width="150"><strong>邮箱</strong></th>
				<th data-options="field:'address',align:'left',halign:'center'" width="300"><strong>地址</strong></th>
				<th data-options="field:'rzsjStr',align:'center',halign:'center'," width="150" sortable="true"><strong>入职时间</strong></th>
				<th data-options="field:'htdqrqStr',align:'center',halign:'center'," width="150" sortable="true"><strong>合同结束日期</strong></th>
				<th data-options="field:'remark',align:'left',halign:'center'" width="200"><strong>备注</strong></th>
				<th data-options="field:'user.id',hidden:true"></th>
				<th data-options="field:'stationCode',hidden:true"></th>
			</tr>
		</thead>
		
	</table>
<!-- Datagrid工具栏 -->
<div id="tb">
	<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
	   <td class="toolDiv">  		
	  		<a href="javascript:void(0)" onclick="add_emp()" class="easyui-linkbutton" data-options="iconCls:'icon-user-add',plain:true">员工入职</a><span class="vline">|</span>
			<a href="javascript:void(0)" onclick="edit_Emp()" class="easyui-linkbutton" data-options="iconCls:'icon-user-edit',plain:true">修改用户</a><span class="vline">|</span>
			<a href="javascript:void(0)" onclick="lock_emp()" class="easyui-linkbutton" data-options="iconCls:'icon-lock',plain:true">锁定用户</a><span class="vline">|</span>
			<a href="javascript:void(0)" onclick="unlock_emp()" class="easyui-linkbutton" data-options="iconCls:'icon-lock-open',plain:true">解锁用户</a><span class="vline">|</span>
			<a href="javascript:void(0)" onclick="lz_emp()" class="easyui-linkbutton" data-options="iconCls:'icon-exit',plain:true">员工离职</a><span class="vline">|</span>
			<a href="javascript:void(0)" onclick="resetpwd_emp()" class="easyui-linkbutton" data-options="iconCls:'icon-key',plain:true">密码重置</a>
		</td>
	</tr>
	<tr>
	   <td class="serchDiv">
	   		<table width="100%" cellpadding="0" cellspacing="0">
	   			<tr>
	   				<td>用户名</td>
	   				<td><input id="userNameSch" class="easyui-textbox" type="text" style="width: 155px;"></td>
	   				<td>学历</td>
	   				<td><input id="eduNameSch" class="easyui-textbox" type="text" style="width: 155px;"></td>
	   				<td>部门</td>
	   				<td><input id="deptIdSch" class="easyui-combotree" value="" data-options="url:'${ctx}/json/listDept2.action',value:'0',valueField:'id'," style="width:155px"/></td>
	   				<td>状态</td>
	   				<td>
						<select id="statusSch" class="easyui-combobox" style="width:155px;">
							<option value="0">--全部--</option>
							<option value="1">正常</option>
							<option value="2">停用</option>
						</select>
	   				</td>
	   				<td>性别</td>
	   				<td>
						<select id="genderSch" class="easyui-combobox" style="width:155px;">
							<option value="0">--全部--</option>
							<option value="1">男</option>
							<option value="2">女</option>
						</select>
	   				</td>
	   			</tr>
	   			<tr>
	   				<td>姓名</td>
	   				<td><input id="nameSch" class="easyui-textbox" type="text" style="width: 155px;"></td>
	   				<td>岗位</td>
	   				<td><input id="stationIdSch" class="easyui-combobox" data-options="
                        	                                                                url:'${ctx}/json/listStationTreeP.action',
                        	                                                                value:'0',
                        	                                                                valueField:'id',
                        	                                                                textField:'stationName',
                        	                                                                panelHeight:'200'" 
                        	                                                                style="width:155px" />
                    </td>
                    <td>婚姻状况</td>
	   				<td>
						<select id="hyzkSch" class="easyui-combobox" style="width:155px;">
							<option value="0">--全部--</option>
							<option value="1">未婚</option>
							<option value="2">已婚</option>
						</select>
	   				</td>
                    <td  colspan="3">
                    	<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" 
								onclick="doQuery()">查询</a>
                    </td>
	   			</tr>
	   		</table>
		</td>
	</tr>
	</table>
</div>
    
       <!-- 详情窗口 -->    
	<div id="xqdlg" style="display: none">
   	</div>
   	
			<!--增加窗口-->
<div id="addWnd"  style="display: none">
	<form id="addForm" method="post" enctype="multipart/form-data" action="${ctx}/emp/saveEmp.action">
	<table class="dlgtb" cellspacing="0" cellpadding="0">
		<tr>
			<td>员工照片</td>
			
			<td  colspan="5" style="padding-left: 10px;">
    			<div id="imgdiv" style="float: left"><img id="imgShow" width="100" height="138" /></div>    		
   			&nbsp;&nbsp;<input name="multipartFiles" type="file" id="up_img" style="margin-top:95px"/>
			</td>
		</tr>
		<tr>
			<td width="70">用户名</td>
			<td>
				<input id="addUsername" name="user.userName" class="easyui-validatebox"  style="width:198px"/>
			</td>
			<td width="70">姓名</td>
			<td>
				<input id="addname" name="user.name" class="easyui-validatebox"  style="width:198px"/>
			</td>
			
			<td width="70">性别</td>
			<td>
				<select id="addsex" name="sex" class="easyui-combobox"  style="width:205px;">
					<option value="1">男</option>
					<option value="2">女</option>
				</select>
			</td>
		</tr>
		<tr>
			  <td>所属部门：</td>
                        <td>
							<input id="addUserDeptId" name="user.deptId" class="easyui-combotree" data-options=" url:'${ctx}/json/listDept.action',
                        	                                                      valueField:'id',
                        	                                                      textField:'dname',
                        	                                                      editable:false,
                        	                                                      required:true,
                        	                                                      panelHeight:'200'" 
                        	                                                      style="width:200px"/>
						</td>
              <td>所属岗位：</td>
              <td>
                        	
                        	<input id="addUserStationId" class="easyui-combobox" name="user.stationId" data-options="
                        	                                                      url:'${ctx}/json/listStationTree.action',
                        	                                                      valueField:'id',
                        	                                                      textField:'stationName',
                        	                                                      editable:false,
                        	                                                      required:true,
                        	                                                      panelHeight:'200'" 
                        	                                                      style="width:200px" />
	          </td>
				<td>出生日期</td>
				<td>
	      	    <input id="addcsrq" name="birthdayStr" class="easyui-datebox" style="width:205px;">
				</td>
		</tr>
		<tr>
			<td>毕业院校</td>
			<td>
				<input id="addbyyx" name="school" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>专业</td>
			<td>
				<input id="addzy" name="zhuanye" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>学历</td>
			<td>
				<input id="addxl" name="education" class="easyui-validatebox"  style="width:198px;"/>
			</td>
		</tr>
		<tr>
			<td>身份证号</td>
			<td>
				<input id="addsfzh" name="sfzh" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>手机号码</td>
			<td>
				<input id="addsjhm" name="phone" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>邮箱</td>
			<td>
				<input id="addyx" name="email" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			
			
		</tr>
		<tr>
			<td>婚姻状态</td>
			<td>
				<select id="addhyzt" name="marriage" class="easyui-combobox"  style="width:205px;">
					<option value="1">未婚</option>
					<option value="2">已婚</option>
				</select>
			</td>
			<td>入职日期</td>
			<td >
		
	      					<input id="addrzrq" name="rzsjStr" class="easyui-datebox" style="width:205px;">
			</td>
			<td>合同到期日期</td>
			<td colspan="5">
		
	      					<input id="addhtdqrq" name="htdqrqStr" class="easyui-datebox" style="width:205px;">
			</td>
		</tr>
		<tr>
			<td>获得证书</td>
			<td>
				<input id="addhdzs" name="certificate" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>地址</td>
			<td colspan="3">
				<input id="adddz" name="address" class="easyui-validatebox"  style="width:99%;"/>
			</td>
		</tr>
		<tr>
			<td>备注</td>
			<td colspan="5">
				<textarea name="remark"  style="overflow-y:hidden;height:50px;width:99%;" onpropertychange="this.style.height=this.scrollHeight+'px';" 
			  				oninput="this.style.height=24+'px';this.style.height=this.scrollHeight+'px';"></textarea>
			</td>
		</tr>
	</table>
	</form>
</div>


	<!--修改窗口-->
<div id="updateWnd"  style="display: none"> 
	<form id="updateForm" method="post" enctype="multipart/form-data" action="${ctx}/emp/saveEmp.action">
	<input id="updateuserid" name="id" type="hidden"/>
	<input id="upuid" name="uid" type="hidden"/>
	<input id="upspell" name="pyspell" type="hidden"/>
	<input id="upuserId" name="user.id" type="hidden"/>
	<table class="dlgtb" cellspacing="0" cellpadding="0">
		<tr>
			<td>员工照片</td>
			
			<td colspan="5" style="padding-left: 10px;">
    			<div id="imgdiv2" style="float: left"><img id="imgShow2" width="100" height="138" /></div>    		
   			&nbsp;&nbsp;<input name="multipartFiles" type="file" id="up_img2" style="margin-top:95px"/>
			</td>
		</tr>
		<tr>
			<td width="70">用户名</td>
			<td>
				<input id="upUsername" name="user.userName" class="easyui-validatebox"  style="width:198px"/>
			</td>
			<td width="70">姓名</td>
			<td>
				<input id="upname" name="user.name" class="easyui-validatebox"  style="width:198px"/>
			</td>
			
			<td width="70">性别</td>
			<td>
				<select id="upsex" name="sex" class="easyui-combobox"  style="width:205px;">
					<option value="1">男</option>
					<option value="2">女</option>
				</select>
			</td>
		</tr>
		<tr>
			  <td>所属部门：</td>
                        <td>
							<input id="upUserDeptId" name="user.deptId" class="easyui-combotree" data-options=" url:'${ctx}/json/listDept.action',
                        	                                                      valueField:'id',
                        	                                                      textField:'dname',
                        	                                                      editable:false,
                        	                                                      required:true,
                        	                                                      panelHeight:'200'" 
                        	                                                      style="width:200px"/>
						</td>
              <td>所属岗位：</td>
              <td>
                        	
                        	<input id="upUserStationId" class="easyui-combobox" name="user.stationId" data-options="
                        	                                                      url:'${ctx}/json/listStationTree.action',
                        	                                                      valueField:'id',
                        	                                                      textField:'stationName',
                        	                                                      editable:false,
                        	                                                      required:true,
                        	                                                      panelHeight:'200'" 
                        	                                                      style="width:200px" />
	          </td>
				<td>出生日期</td>
				<td>
	      	    <input id="upCsrq" name="birthdayStr" class="easyui-datebox" style="width:205px;">
				</td>
		</tr>
		<tr>
			<td>毕业院校</td>
			<td>
				<input id="upByyx" name="school" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>专业</td>
			<td>
				<input id="upzy" name="zhuanye" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>学历</td>
			<td>
				<input id="upxl" name="education" class="easyui-validatebox"  style="width:198px;"/>
			</td>
		</tr>
		<tr>
			<td>身份证号</td>
			<td>
				<input id="upsfzh" name="sfzh" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>手机号码</td>
			<td>
				<input id="upsjhm" name="phone" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>邮箱</td>
			<td>
				<input id="upyx" name="email" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			
			
		</tr>
		<tr>
			<td>婚姻状态</td>
			<td>
				<select id="uphyzt" name="marriage" class="easyui-combobox"  style="width:205px;">
					<option value="1">未婚</option>
					<option value="2">已婚</option>
				</select>
			</td>
			<td>入职日期</td>
			<td >
		
	      					<input id="uprzrq" name="rzsjStr" class="easyui-datebox" style="width:205px;">
			</td>
			<td>合同到期日期</td>
			<td colspan="5">
		
	      					<input id="uphtdqrq" name="htdqrqStr" class="easyui-datebox" style="width:205px;">
			</td>
		</tr>
		<tr>
			<td>获得证书</td>
			<td>
				<input id="uphdzs" name="certificate" class="easyui-validatebox"  style="width:198px;"/>
			</td>
			<td>地址</td>
			<td colspan="3">
				<input id="updz" name="address" class="easyui-validatebox"  style="width:99%;"/>
			</td>
		</tr>
		<tr>
			<td>备注</td>
			<td colspan="5">
				<textarea id="upRemark" name="remark"  style="overflow-y:hidden;height:50px;width:99%;" onpropertychange="this.style.height=this.scrollHeight+'px';" 
			  				oninput="this.style.height=24+'px';this.style.height=this.scrollHeight+'px';"></textarea>
			</td>
		</tr>
	</table>
	</form>	
</div>


<!-- 员工离职对话框 -->
<div id="lizhiWnd"  style="width:300px;height:300px;display: none"> 
	<form id="lizhiForm" method="post" action="${ctx}/emp/addDimission.action">
		  <input id="lzuserid" name="uiid" type="hidden"/>
          <table>
               <tr>
                   <td height="30px" width ="80px">离职日期：</td>
                   <td><input id="userlzrq"  name="lzrqStr" class="easyui-datebox" required="required" editable="false" style="width:200px" /></td>
               </tr>
               <tr>
                   <td  height="30px" width="80px">离职原因：</td>
                   <td><input id="useryy"  name="lzyy" class="easyui-validatebox"  editable="false" style="width:200px" /></td>
               </tr>
               <tr>
                   <td  height="30px" width="80px">备注：</td>
                   <td><textarea id="beizhu2" name="remark" class="validatebox"  data-options="multiline:true" style="width:200px;height:100px">
					</textarea></td>
               </tr>
           </table>	
     </form>
</div> 	
	
  </body>
</html>
